package main

import (
	"fmt"
	"strings"
)

// 首字符大写，或全部字符大写
func detectCapitalUse(word string) bool{
	if word == "" {
		return true
	}
	//否则起码有一个字符 
	//统计大小写字符
	upper := 0
	for i:=0;i<len(word);i++{
		if word[i]>='A' && word[i]<='Z'{
			upper++
		}
	}
	if upper == len(word){
		return true
	}
	if upper == 0 {
		return true
	}
	if upper==1 && word[0] <'a'{
		return true
	}
	return false
}

func main() {
	word := "g"
	fmt.Println(detectCapitalUse(word))
}